package com.migration.model.olddb;

import jakarta.persistence.*;
import lombok.Data;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * 系统日志表 实体类
 * 表名：sys_log
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "sys_log")
public class SysLog implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false, length = 32)
    private String id;
    
    /**
     * 日志类型（1登录日志，2操作日志）
     */
    @Column(name = "log_type")
    private Integer logType;
    
    /**
     * 日志内容
     */
    @Column(name = "log_content", length = 1000)
    private String logContent;
    
    /**
     * 操作类型
     */
    @Column(name = "operate_type")
    private Integer operateType;
    
    /**
     * 操作用户账号
     */
    @Column(name = "userid", length = 32)
    private String userid;
    
    /**
     * 操作用户名称
     */
    @Column(name = "username", length = 100)
    private String username;
    
    /**
     * IP
     */
    @Column(name = "ip", length = 100)
    private String ip;
    
    /**
     * 请求java方法
     */
    @Column(name = "method", length = 500)
    private String method;
    
    /**
     * 请求路径
     */
    @Column(name = "request_url", length = 255)
    private String requestUrl;
    
    /**
     * 请求参数
     */
    @Column(name = "request_param", length = 2147483647)
    private String requestParam;
    
    /**
     * 请求类型
     */
    @Column(name = "request_type", length = 10)
    private String requestType;
    
    /**
     * 耗时
     */
    @Column(name = "cost_time")
    private Long costTime;
    
    /**
     * 创建人
     */
    @Column(name = "create_by", length = 32)
    private String createBy;
    
    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private java.time.LocalDateTime createTime;
    
    /**
     * 更新人
     */
    @Column(name = "update_by", length = 32)
    private String updateBy;
    
    /**
     * 更新时间
     */
    @Column(name = "update_time")
    private java.time.LocalDateTime updateTime;
    
    @Override
    public String toString() {
        return "SysLog{" +
            "id=" + id +
            ", logType=" + logType +
            ", logContent=" + logContent +
            ", operateType=" + operateType +
            ", userid=" + userid +
            ", username=" + username +
            ", ip=" + ip +
            ", method=" + method +
            ", requestUrl=" + requestUrl +
            ", requestParam=" + requestParam +
            ", requestType=" + requestType +
            ", costTime=" + costTime +
            ", createBy=" + createBy +
            ", createTime=" + createTime +
            ", updateBy=" + updateBy +
            ", updateTime=" + updateTime +
        '}';
    }
} 